#ifndef TERRAIN_H
#define TERRAIN_H

#include <vector>
#include "StaticTrimesh.h"
#include "SOIL.h"

class Terrain : public StaticTrimesh
{
public:
	GLuint texture;
	bool useTexture;

	/// Creats a terrain object. If the terrain is centered it is centered then translated
	/// by the amount specified in the translation parameters
	/// @param space the geom space the terrain will be added to
	/// @param heights a vector contain height values
	/// @param depth the depth of the terrain, this will be the height of a height map
	/// @param width the width of the terrain, this will be the width of the height map
	/// @param xScale amount the vertices of this terrain should be sacled in x direction
	/// @param yScale amount the vertices of this terrain should be sacled in y direction
	/// @param zScale amount the vertices of this terrain should be sacled in z direction
	/// @param xTranslation amount the vertices of this terrain should be tranlated in x direction
	/// @param yTranslation amount the vertices of this terrain should be tranlated in y direction
	/// @param zTranslation amount the vertices of this terrain should be tranlated in z direction
	/// @param center if true this terrain will be centered around (0,0,0) with respect to x and z
	Terrain(dSpaceID space, std::vector<int> &heights, int depth, int width,
			float xScale, float yScale, float zScale,
			float xTranslation, float yTranslation, float zTranslation,
			bool center);

	virtual void render();
};

#endif //TERRAIN_H